<template>
	<view :class="currentTheme">
		<a-nabbar name="正在测本中" />
		<view class="u-padding-left-32 u-padding-right-32">
			<view  v-for="(item,index) in dataList" :key="index" class="u-margin-top-20" @click="carTime(item)">
				<list-item :item="{...item,hotelAddress:''}" :showStar="false" :showFooterRight="false" :isShare="false" height="346">
					<view slot="content">
						<!-- <view class="u-font-20 text-color-B0B2D8 u-padding-top-20">
							开放上车时间:{{item.enrollTime}}
						</view>
						<view class="u-font-20 text-color-B0B2D8 u-padding-top-20">
							发车时间:{{item.estimateTime}}
						</view> -->
						<view class="u-flex">
							<flex-text txt="开放上车时间" size="24" width="145"></flex-text>
							<text class="u-font-24">：{{item.enrollTime | timeFormat}}</text>
						</view>
						<view class="u-flex u-margin-top-10">
							<flex-text txt="发车时间" size="24" width="145"></flex-text>
							<text class="u-font-24">：{{item.estimateTime | timeFormat}}</text>
						</view>
						<view class="u-margin-top-10 desc-box desc u-font-24 content-desc-item u-line-2" v-if="item.info">
							<flex-text txt="剧本简介" size="24" width="145"></flex-text>
							<text class="u-font-24">：{{item.info}}</text>
						</view>
					</view>
					<view  slot="footer-end" class="u-flex u-row-right u-margin-top-32">
						<view class="u-font-28 text-color-txtTheme">{{item.participate}}/{{item.people}}</view>
						<view  class="content-desc-item u-font-24 u-margin-left-32">测本中</view>
					</view>
					<!-- <view slot="footer-start"  class="u-margin-top-10 u-flex u-row-between" v-if="item.userSmallDtos&&item.userSmallDtos.length">
						<view class="u-flex">
							<view class="u-margin-right-10 u-position-relative" :style="{width:56+((item.userSmallDtos.length - 1)*25)+'rpx',height:'56rpx'}">
								<view class="u-position-absolute avatar" v-for="(val,i) in item.userSmallDtos.slice(0,4)" :style="{left:i*25+'rpx'}" :key="i">
                  				<item-image :type="'1'" :img="item.avatar"  :size="56"   />
								</view>
							</view>
							<u-icon name="more-dot-fill" size="50" color="#765CFE" v-if="item.userSmallDtos.length>4"></u-icon>
						</view>
						
					</view> -->
					<!-- <view slot="footer" class="u-flex u-row-between u-margin-top-15">
						<view class="u-flex">
              				<item-image :type="'1'" :img="item.avatar"  :size="42"  class="u-margin-right-8"  :fade="false" />
							<text class="text-bold u-font-28 text-black">{{item.createName || '' }}</text>
						</view>
						<view>
							<view class="u-font-28 text-color-765CFE">{{item.participate}}/{{item.people}}</view>
							<view @click="carTime(item)" class="text-black u-font-20">测本中</view>
						</view>
					</view> -->
				</list-item>
			</view>
		</view>
	</view>
</template>

<script>
	import {add} from  '@/api/crud.js'
	export default {
		data() {
			return {
				dataList:[],
				apiModule:'shopApi'
			};
		},
		onLoad() {
			this.getList()
		},
		methods: {
			getList() {
				add('','driveCar',this.apiModule,`getUserRunningCar/${this.loginForm.uid}`).then(res=>{
					this.dataList = res.map(val=>{
						val.userSmallDtos = val.userSmallDtos.map(item=>{
							return item;
						})
						return val;
					});
				})
			},
			//跳转到倒计时页面
			carTime(item){
				this.$u.route({
					url:'/pagesA/carTime/carTime',
					params:{
						id:item.id
					}
				})
			}
		},
	}
</script>

<style lang="scss" scoped>
</style>
